package com.farsunset.cim.client.android;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * Login request.
 * @author
 */
public class ControlCmd extends Command {
   
    private final CmdInfo cmdInfo;
    private final String resultStr;
    /**
     * Constructor.
     * @param aCmdId command id.
     * @param aCmdInfo 指令内容.
     * @param result 指令执行的返回结果.
     */    
    public ControlCmd(int aCmdId, CmdInfo aCmdInfo,String result) {
        super(CommandType.CONTROLCMD, aCmdId);
        cmdInfo = aCmdInfo;
        resultStr=result;
    }

    public CmdInfo getCmdInfo() {
        return cmdInfo;
    }
    public String getReslut() {
        return resultStr;
    }
    /** {@inheritDoc} */
    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
        .appendSuper(super.toString())
        .append("cmdInfo", cmdInfo)
        .append("resultStr", resultStr)
        .toString();
    }
    
}
